<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <base href="${path}/pages/">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <title>个人主页</title>
  <link rel="stylesheet" href="../layui/css/layui.css" media="all">
</head>
<body>
<ul class="layui-nav" lay-filter="">
  <li class="layui-nav-item"><a href="${path}/action/user/index"><i class="layui-icon">&#xe68e;</i></a></li>
  <li class="layui-nav-item"><a href="${path}/action/user/index"><i class="layui-icon layui-icon-fire"></i> 影评天下</a></li>
  <li class="layui-nav-item" style="float:right" >
  	<a href="${path}/pages/register.jsp" id="register">注册</a>
  </li>
  <li class="layui-nav-item" style="float:right" >
    <a href="${path}/pages/login.jsp" id="login">登录</a>
  </li>
  <li class="layui-nav-item" style="float:right" >
  <a href="${path}/action/user/userCenter" id="user_center"></a>
  <dl class="layui-nav-child"> <!-- 二级菜单 -->
      <dd><a href="${path}/action/user/logout">登出</a></dd>
   </dl>
  </li>
  <li> <input type="hidden" value="${user.flag }" id="flag"></li>
   <li> <input type="hidden" value="${writer.sex }" id="sex"></li>
   <li> <input type="hidden" value="${writer.id }" id="writerId"></li>
</ul>



<div class="layui-container" >
<span class="layui-breadcrumb" style="font-size:40px">
  <a href="writer_review.jsp" target="page" id="review"></a>
  <a href="writer_info.jsp" target="page" id="info"></a>
</span>
	<div >
		<iframe name="page" src="writer_review.jsp" width="100%" height="100%" frameborder="0"  id="iframe1" ></iframe>
  </div>
</div>
<script type="text/javascript" src="../layui/layui.js"></script>
<script>
layui.use(['element','jquery'],function(){
	var element=layui.element;
	var $=layui.$;
	var flag=$('#flag').val();
	var sex=$('#sex').val();
  	var success=(flag=="");
  	
  	if(success!=true){
          	 $("#user_center").html("个人中心");
          	 $("#login").html("");
          	 $("#register").html("");

      	}else{
      		$("#user_center").html("");
      	 	$("#login").html("登录");
      	 	$("#register").html("注册");
      	}	
  	
  	

  	if(sex=="男"){
  		  $('#review').html("他的影评");
  		  $('#info').html("他的资料");
  	  }else{
  		  $('#review').html("她的影评");
  		  $('#info').html("她的资料");
  	  }

})   	
</script>
</body>


</html>